#ifndef PURG_SPRNG_INTERFACE_H
#define PURG_SPRNG_INTERFACE_H

#include <sprng.h>

namespace purg
{

  class purgSpring : public Sprng
  {
    private:
      parallel_gen   *_purg;
      int             _id;
      int             _seed;

    public:
      purgSpring ();
      virtual ~purgSpring ();

      virtual int init_rng ( int , int , int , int );
      virtual int get_rn_int ();
      virtual float get_rn_flt ();
      virtual double get_rn_dbl ();
      virtual int spawn_rng ( int nspawned , Spring ***newgens );
      virtual int get_seed_rng ();
      virtual int free_rng ();
      virtual int pack_rng ( char **buffer );
      virtual int print_rng ();
      virtual int unpack_rng ( char *packed );
  };

}


extern "C"
{

  // Simple interface

  int *   init_sprng ( int seed , int param , int rng_type = 0 );
  double  sprng ();
  int     isprng ();
  int     print_sprng ();
  int     make_sprng ();
  int     make_sprng_seed ();
  int     pack_sprng ( char **buffer );
  int *   unpack_sprng ( char *buffer , int rng_type = 0 );

}

#endif

